import edu.vanderbilt.isis.sm.Event;
import edu.vanderbilt.isis.sm.StateflowInterpreter;
import edu.vanderbilt.isis.sm.SymbolicDataProvider;

public class TestClock {

	TopLevelClock c;
	
	public TestClock() {
		this.c = new TopLevelClock();
		
		ClockReader tReader = new ClockReader(this.c.r1.Clock3, new SymbolicDataProvider(1),null);

		this.c.sim = new StateflowInterpreter(this.c.sm, tReader);
		this.c.sim.disablePrinting();
		this.c.sim.initialize();
	}
	
	public static void main(String[] args) {
		System.out.println("********************");
		TestClock test = new TestClock();
		printClock(test.c);
		Event e = new Event("");
		for (int i = 0; i<20; i++) {
			test.c.sim.addEvent(e);
			test.c.sim.step();
			printClock(test.c);
		}		
	}

	private static void printClock(TopLevelClock c) {
		System.out.println("Clock={time=" + c.r1.Clock3.time + "}");
	}
	
}
